package tests;

import common.Utils;
import org.openqa.selenium.By;

public class UserListPage extends Utils {

    private static String url = "http://82.156.185.199:8080/admin.html";

    public UserListPage() {
        super(url);
    }

    public void testPage(){
        // 切换回主页面（关键！）
        driver.switchTo().defaultContent();
        driver.findElement(By.cssSelector("#userList")).click();
        driver.switchTo().frame(0);
        // "人员列表"
        driver.findElement(By.cssSelector("body > div > h2"));
        // "人员id"
        driver.findElement(By.cssSelector("body > div > div > table > thead > tr > th:nth-child(1)"));
        // "姓名"
        driver.findElement(By.cssSelector("body > div > div > table > thead > tr > th:nth-child(2)"));
        // "身份"
        driver.findElement(By.cssSelector("body > div > div > table > thead > tr > th:nth-child(3)"));
    }
}
